#include<iostream>
#include<cstdlib>
#include<string>
#include<unistd.h>
#include<signal.h>
#include<sys/types.h>
#include<cstring>
#include<cerrno>
#include<cassert>

void Usage(std::string proc )
{
    printf("\tUsage\n\t");
    std::cout << proc << "信号编号 目标进程" << std::endl;
}
int main(int argc,char* argv[])
{
    if(argc!=3)
    {
        Usage(argv[0]);
        exit(1);
    }
    int signo = atoi(argv[1]);
    int target_id = atoi(argv[2]);
    int n = kill(target_id,signo);
    if(n!=0)
    {
        std::cerr << errno <<":"<<strerror(errno) << std::endl;
    }

}
